<?php
namespace app\modules\user\models;


use app\common\base\ApiModel;
use app\modules\user\behaviors\TimestampBehavior;

class Account extends ApiModel{

    public static function tableName(){
        return 'user_account';
    }

    public function behaviors()
    {
        return [
            [
                'class' => TimestampBehavior::class,
            ]
        ];
    }

    public function rules()
    {
        return [
            [['username', 'pwd'], 'required'],
            [['username', 'pwd', 'nickname'], 'string'],
            ['email','email'],
            [['type', 'status'],'integer'],
            [['type', 'status'], 'default', 'value' => 1],
            ['status', 'in', 'range' => [0, 1]],
        ];
    }


}